#include "Arc.h"

Arc::Arc(int vid, int w, Arc* next):
		vertex_id(vid),weight(w),next_arc(next){
}

Arc::Arc(const Arc& arc){
	if(this!=&arc && 0!=&arc){
		this->vertex_id = arc.vertex_id;
		this->weight = arc.weight;
		if(arc.next_arc!=0){
			this->next_arc = new Arc(*arc.next_arc);
		}else{
			this->next_arc = 0;
		}
	}
}

Arc& Arc::operator=(const Arc& arc){
	if(this!=&arc && 0!=&arc){
		this->vertex_id = arc.vertex_id;
		this->weight = arc.weight;
		if(arc.next_arc!=0){
			this->next_arc = new Arc(*arc.next_arc);
		}else{
			this->next_arc = 0;
		}
	}
	return *this;
}
